<?php
//
// +---------------------------------------------------------------------------------+
// | Package: EezeeSite Core                                                         |
// +---------------------------------------------------------------------------------+
// | Copyright (C) 2006  EezeeSite Development Team                                  |
// +---------------------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or                   |
// | modify it under the terms of the GNU General Public License                     |
// | as published by the Free Software Foundation; either version 2                  |
// | of the License, or (at your option) any later version.                          |
// |                                                                                 |
// | This program is distributed in the hope that it will be useful,                 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                  |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                   |
// | GNU General Public License for more details.                                    |
// |                                                                                 |
// | You should have received a copy of the GNU General Public License               |
// | along with this program; if not, write to the Free Software                     |
// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. |
// +---------------------------------------------------------------------------------+
// | Author: Mayukh De <mayukhde@gmail.com>                                          |
// +---------------------------------------------------------------------------------+
//

//global config array

$GLOBALS['ES']['VERSION'] = '1.7';

$GLOBALS['ES']['COREDIR']     = dirname(__FILE__);
$GLOBALS['ES']['CNFDIR']      = $GLOBALS['ES']['COREDIR'].'/cnf';
$GLOBALS['ES']['INCDIR']      = $GLOBALS['ES']['COREDIR'].'/inc';
$GLOBALS['ES']['LIBDIR']      = $GLOBALS['ES']['COREDIR'].'/lib';
$GLOBALS['ES']['TEMPDIR']     = (!ini_get('upload_tmp_dir') || ini_get('upload_tmp_dir') == '') ? $GLOBALS['ES']['COREDIR'].'/temp' : ini_get('upload_tmp_dir');;
$GLOBALS['ES']['SESSIONSDIR'] = (!ini_get('session.save_path') || ini_get('session.save_path') == '') ? $GLOBALS['ES']['COREDIR'].'/sessions' : ini_get('session.save_path');;
$GLOBALS['ES']['INCLUDESDIR'] = '';

$GLOBALS['ES']['ESLOGO'] = file_get_contents($GLOBALS['ES']['COREDIR'].'/es.powered.jpg');

$GLOBALS['ES']['SUPPORTEMAIL']  = 'system@eezeesite.com';
$GLOBALS['ES']['SUPPORTSERVER'] = array(
                                       'IP' => '127.0.0.1',
                                       'HOST' => 'support.eezeesite.com'
                                       );

$GLOBALS['ES']['DBSUPPORT'] = array(
                                   'MYSQL' => 'MySQL'
                                   );

$GLOBALS['ES']['DEBUGMODE'] = true;

$GLOBALS['ES']['EMAILPROTOCOLS'] = array(
                                        'MAIL'     => 'Mail',
                                        'SMTP'     => 'SMTP',
                                        'SENDMAIL' => 'SendMail'
                                        );
$GLOBALS['ES']['EMAILSETTINGS'] = array(
                                       'MAIL'     => null,
                                       'SMTP'     => array(),
                                       'SENDMAIL' => array('sendmail_path' => '/usr/sbin/sendmail')
                                       );
                                       
$GLOBALS['ES']['ALLOWCLIENT'] = array(
                                     'REWRITEURLS' => true,
                                     'USECACHEING' => true
                                     );
									 
$GLOBALS['ES']['CACHELIFETIME']	= 300;

$GLOBALS['ES']['CALENDAR'] = array(
                                  'language' => 'en',
                                  'format'   => 'M-d-Y',
                                  'minYear'  => 1971,
                                  'maxYear'  => date('Y')
                                  );
                                     
$GLOBALS['ES']['AUTHTIMEOUT'] = array(
                                     'EXPIRE' => 3600,
                                     'IDLE'   => 1800
                                     );
                                     
$GLOBALS['ES']['POSTSIGNUPOPTIONS'] = array(
                                           'SENDACTIVATIONMAIL' => $GLOBALS['ES']['LANG']['POSTSIGNUPOPTIONS']['SENDACTIVATIONMAIL'],
                                           'PROMPTUSERLOGIN'    => $GLOBALS['ES']['LANG']['POSTSIGNUPOPTIONS']['PROMPTUSERLOGIN'],
                                           'AUTOLOGINUSER'      => $GLOBALS['ES']['LANG']['POSTSIGNUPOPTIONS']['AUTOLOGINUSER'],
                                           'NOACTION'           => $GLOBALS['ES']['LANG']['POSTSIGNUPOPTIONS']['NOACTION']
                                           );                                    
                                     
$GLOBALS['ES']['PERM']['AREAS']     = array('ADMIN', 'USER', 'CATEGORY');
$GLOBALS['ES']['PERM']['AREAPERMS'] = array(
                                           'ADMIN'    => array(
                                                              'LEVEL1' => array('area_access'),
                                                              'LEVEL2' => array('upgrade', 'manage_users', 'manage_groups', 'manage_static_pages', 'manage_site')
                                                              ),
                                           'USER'     => array(
                                                              'LEVEL1' => array('area_access', 'profile_access', 'contacts_access', 'gallery_access', 'user_page_access', 'bookmarks_access', 'user_post_access'),
                                                              'LEVEL2' => array('rate_profile', 'add_profile_comment', 'add_note', 'request_contact', 'rate_gallery_items', 'add_user_page_comment', 'rate_user_page', 'rate_bookmarks'),
                                                              'LEVEL3' => array('manage_messages', 'manage_contacts', 'manage_notes', 'manage_profile', 'manage_gallery', 'manage_user_page', 'manage_bookmarks')
                                                              ),
                                           'CATEGORY' => array()
                                           );
                                       
//defined system wide constants

define('ES_FILE_EXTN', '.php');
define('ES_LU_PRE', 'lu_');

if ($GLOBALS['ES']['DEBUGMODE']) {
    error_reporting(E_ALL^E_NOTICE);
} else {
    error_reporting(0);
}

if ($GLOBALS['ES']['INCLUDESDIR'] && !empty($GLOBALS['ES']['INCLUDESDIR'])) {
    ini_set('include_path', '.'.PATH_SEPARATOR.$GLOBALS['ES']['INCLUDESDIR'].'/PEAR'.PATH_SEPARATOR.$GLOBALS['ES']['INCLUDESDIR'].'/UTILS');
}

?>